package Text3;

import java.util.Objects;

/*
 *@Student 张策
 */
public class MyDate {
    private int year;
    int yourse;
    int day;

    public MyDate(int year, int yourse, int day) {
        this.year = year;
        this.yourse = yourse;
        this.day = day;
    }

    @Override
    public boolean equals(Object object) {
        if (this == object) return true;
        if (object == null || getClass() != object.getClass()) return false;
        MyDate myDate = (MyDate) object;
        return year == myDate.year && yourse == myDate.yourse && day == myDate.day;
    }

    @Override
    public int hashCode() {
        return Objects.hash(year, yourse, day);
    }
}
